8010EF90	p->80229050

Requires sending a few values to 80229050...
80229050+C	80801A34	pointer correction value, used for ROM lookup
80229050+10	00000240	size, used for allocation
80229050+9F	00		trigger load, unset loaded

So really, a generic debug menu tool would be as simple as setting this to an arbitrary activator.
For instance, trigger debug when controller 2 L+R pressed:
D0145B49 0030
8122905C 8080
D0145B49 0030
8122905E 1A34
D0145B49 0030
81229062 0240
D0145B49 0030
802290EF 0000

800C4E58 exclusively handles inventory and map activation.  Could just hook it there,

+_+

CLEAR OUT SPACE IN 800C4E58
800C4E58
ADDIU	SP,SP,FFD0
SW	RA,0014 (SP)
OR	A1,A0,R0
LW	T6,1CC8 (A1)
BNEL	T6,R0,800C50B8
LW	RA,0014 (SP)
//800C4E70:
LBU	T7,1EE0 (A1)
BNEL	T7,R0,800C50B8
LW	RA,0014 (SP)
//800C4E7C:
LBU	T8,1EE3 (A1)
ADDIU	A0,R0,1000	;A0= Start button
BNEL	T8,R0,800C50B8
LW	RA,0014 (SP)
//800C4E94:	test for Start button
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0030 (SP)
BEQ	V0,R0,800C4EA8
LUI	T9,8013
LBU	T9,7908 (T9)
BEQL	T9,R0,800C4EE4
LW	A0,0030 (SP)
//800C4EA8:	test for R button
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0010	;A0= R button
SLTU	A0,R0,V0	;A0=V0: TRUE if pressed
BEQ	A0,R0,800C4ECC	;branch if not pressed
ADDIU	AT,R0,0001
LUI	A0,8013
LBU	A0,6FE0 (A0)	;A0=80136FE0: map acquisition flag
XORI	A0,A0,0001	;A0^=1
SLTIU	A0,A0,0001	;A0=TRUE if 1 exclusively set
//800C4ECC:
BNE	A0,AT,800C4F6C	;branch if map not acquired or button not pressed
LUI	T0,8013
LBU	T0,7908 (T0)
BNEL	T0,R0,800C4F70
LW	A0,0030 (SP)
//800C4EE0:
LW	A0,0030 (SP)
ADDIU	V0,A0,1CBC
LBU	T1,00E2 (V0)
BNEL	T1,R0,800C4F70
LW	A0,0030 (SP)
LBU	T2,00E3 (V0)
BGTZL	T2,800C4F70
LW	A0,0030 (SP)
JAL	800B3408
SW	V0,001C (SP)
BEQL	V0,R0,800C4F70
LW	A0,0030 (SP)
JAL	8007D7BC
NOP
BNEL	V0,R0,800C4F70
LW	A0,0030 (SP)
//800C4F20:
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,1000	;A0= Start button
BEQ	V0,R0,800C4F4C
LW	A0,001C (SP)
LW	A0,001C (SP)
ADDIU	A1,R0,0001
OR	A2,R0,R0
JAL	800C4D8C
OR	A3,R0,R0
BEQ	R0,R0,800C4F5C
NOP
//800C4F4C:
ADDIU	A1,R0,0005
ADDIU	A2,R0,0001
JAL	800C4D8C
OR	A3,R0,R0
//800C4F5C:	734DC
JAL	800C4E2C
LW	A0,0030 (SP)
BEQ	R0,R0,800C5094
LW	V0,001C (SP)
//800C4F6C:
LW	A0,0030 (SP)
ADDIU	V0,A0,1CBC
JAL	800B1C84
SW	V0,001C (SP)
BEQL	V0,R0,800C5094
LW	V0,001C (SP)


-insert this at opening:
//800C4E7C:	733FC
	LBU	T8,1EE3 (A1)
1700008C	*BNE	T8,R0,800C50B4	;command is up one line, so don't change value
AFA50030	*SW	A1,0030 (SP)
//800C4E++:	test for c-up +up
0C01E36B	*JAL	80078DAC	;V0=nonzero if buttons A0 pressed
24040808	*ADDIU	A0,R0,0808	;A0= C up, + up
10400007	*BEQ	V0,R0,800C4E94
8FA50030	*LW	A1,0030 (SP)
3C048080	*LUI	A0,8080
34841A34	*ORI	A0,A0,1A34
ACA4000C	*SW	A0,000C (A1)
34040240	*ORI	A0,R0,0240
ACA40010	*SW	A0,0010 (A1)
A0A0009F	*SB	R0,007F (A1)
//800C4E94:	test for Start button
	JAL	80078DAC	;V0=nonzero if buttons A0 pressed
24041000	*ADDIU	A0,R0,1000	;A0= Start button
	BEQ	V0,R0,800C4EA8
	LUI	T9,8013
	LBU	T9,7908 (T9)
	BEQL	T9,R0,800C4EE4
	LW	A0,0030 (SP)


//800C502C:	A1=6
LW	A0,001C (SP)
ADDIU	A1,R0,0006
OR	A2,R0,R0
JAL	800C4D8C
OR	A3,R0,R0
JAL	800C4DFC
LW	A0,0030 (SP)
BEQ	R0,R0,800C5094
LW	V0,001C (SP)
//800C5050:	A1=5
LW	A0,001C (SP)
ADDIU	A1,R0,0005
OR	A2,R0,R0
JAL	800C4D8C
OR	A3,R0,R0
JAL	800C4DFC
LW	A0,0030 (SP)
BEQ	R0,R0,800C5094
LW	V0,001C (SP)
//800C5074:	A1=8
LW	A0,001C (SP)
ADDIU	A1,R0,0008
OR	A2,R0,R0
JAL	800C4D8C
OR	A3,R0,R0
JAL	800C4DFC
LW	A0,0030 (SP)
//800C5090:
LW	V0,001C (SP)

To-
//800C502C:	blank
	NOP
	...
//800C5064:	735E4	A1=6
10000004	*BEQ	R0,R0,+4
24050006	*ADDIU	A1,R0,0006
//800C506C:	735EC	A1=5
10000002	*BEQ	R0,R0,+2
24050005	*ADDIU	A1,R0,0005
//800C5074:	735F4	A1=8
24050008	*ADDIU	A1,R0,0008
8FA4001C	*LW	A0,001C (SP)
	OR	A2,R0,R0
	JAL	800C4D8C
	OR	A3,R0,R0
	JAL	800C4DFC
	LW	A0,0030 (SP)
//800C5090:
	LW	V0,001C (SP)


